package action;

import controlleur.GestionJeu;
import modele.Berger;
import modele.Champ;
import modele.Mouton;
import modele.Partie;

/**
 *
 * @author DONG Xiangxiang Durand Rémi
 */
public class DeplacerMouton extends Action {

    private Mouton mouton;
    private Champ champsDestination;

    public DeplacerMouton(Mouton mouton, Champ champ) {
        this.champsDestination = champ;
        this.mouton = mouton;
    }

    public void jouer(Berger berger, Partie partie) {
        if(GestionJeu.verifierDeplacementMouton(partie, berger, mouton, this.champsDestination)){
            mouton.setPosition(this.champsDestination);
            
        }
    }

    public Mouton getMouton() {
        return mouton;
    }
}
